<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
   {:token()}
    <div class="form-group form-handle">
        <label class="control-label col-xs-12 col-sm-3">{:__('甲方')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-originator" class="form-control" name="row[originator]" type="text" value="{$row.originator|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('乙方')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-partner" class="form-control" name="row[partner]" type="text" value="{$row.partner|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('牵头部门')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-department_id" data-rule="required" data-source="department/index/selectpage" class="form-control selectpage" name="row[department_id]" type="text" value="{$row.department_id|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('主要参与部门')}:</label>
        <div class="col-xs-12 col-sm-7">
            {$participatingList}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('cname')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-cname" class="form-control" name="row[cname]" type="text" value="{$row.cname|htmlentities}">
        </div>
    </div>
	
	<div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-7">
            {$TypeList}
        </div>
    </div>

    <!-- 判断项目流程是否为流程中-->
    <?php if($row['status'] > 0):?>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Startdate')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-startdate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[startdate]" type="text" value="{$row.startdate}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Enddate')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-enddate" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[enddate]" type="text" value="{$row.enddate}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('签约时期')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-signingperiod" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[signingperiod]" type="text" value="{$row.signingperiod}">
        </div>
    </div>
    <?php endif;?>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Contacts')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-contacts" class="form-control" name="row[contacts]" type="text" value="{$row.contacts|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-mobile" class="form-control" name="row[mobile]" type="text" value="{$row.mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Counterpart')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-counterpart" class="form-control" name="row[counterpart]" type="text" value="{$row.counterpart|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Counterpart_mobile')}:</label>
        <div class="col-xs-12 col-sm-7">
            <input id="c-counterpart_mobile" class="form-control" name="row[counterpart_mobile]" type="text" value="{$row.counterpart_mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-7">
            <textarea id="c-remarks" class="form-control " rows="5" name="row[remarks]" cols="50">{$row.remarks|htmlentities}</textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Agreementfile')}:</label>
        <div class="col-xs-12 col-sm-7">
            <div class="input-group">
                <input id="c-agreementfile" class="form-control" size="50" name="row[agreementfile]" type="text" value="{$row.agreementfile|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-agreementfile" class="btn btn-danger faupload" data-input-id="c-agreementfile" data-multiple="false" data-preview-id="p-agreementfile"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-agreementfile" class="btn btn-primary fachoose" data-input-id="c-agreementfile" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-agreementfile"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-agreementfile"></ul>
        </div>
    </div>
    <!-- 判断项目流程是否为流程中-->
    <?php if($row['status'] > 0):?>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Agreement')}:</label>
        <div class="col-xs-12 col-sm-7">
            <div class="input-group">
                <input id="c-agreement" class="form-control" size="50" name="row[agreement]" type="text" value="{$row.agreement|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-agreement" class="btn btn-danger faupload" data-input-id="c-agreement" data-multiple="false" data-preview-id="p-agreement"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-agreement" class="btn btn-primary fachoose" data-input-id="c-agreement" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-agreement"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-agreement"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-3">{:__('Scansion')}:</label>
        <div class="col-xs-12 col-sm-7">
            <div class="input-group">
                <input id="c-scansion" class="form-control" size="50" name="row[scansion]" type="text" value="{$row.scansion|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-scansion" class="btn btn-danger faupload" data-input-id="c-scansion" data-multiple="false" data-preview-id="p-scansion"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-scansion" class="btn btn-primary fachoose" data-input-id="c-scansion" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-scansion"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-scansion"></ul>
        </div>
    </div>
    <?php endif;?>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-3"></label>
        <div class="col-xs-12 col-sm-7">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
